package yartiss.engine.simulation;

import yartiss.engine.simulation.system.ITask;

public interface IEnergyProfile {

	public boolean isGolobalConsumptionProfile();
	public void setGolobalConsumptionProfileEnabled(boolean bool);
	
	public IEnergyConsumptionProfile getGlobalEnergyConsumptionProfile();
	public void setGlobalEnergyConsumptionProfile(IEnergyConsumptionProfile p);
	
	public long getStartEnergyLevel() ;
	
	public long getMaxEnergyLevel() ;

	public long getMinEnergyLevel();

	public long getCurrentEnergyLevel() ;

	public long getPowerRate() ;
	
	// TODO : date is passed just for assert debug : find a way to be able to obtain date from any method without having to pass it through parameters
	public void updateEnergy(long duration, long consumption,long date);

	public long howLongCanExecute(Iterable<ITask>  tasks);
	public long howLongCanExecute(ITask ... tasks) ;
	public long howLongCanExecute(long maxEnergyToConsume, ITask ... tasks) ;
	public long howLongCanExecute(long maxEnergyToConsume, Iterable<ITask>  tasks) ;
	
	public long howMuchCanRecharge(long duration); 
	
	public void reset();
	
	public IEnergyProfile newInstance(int ... params);
	public String getName();
}
